About QuickDraw GX Shapes
Shapes are fundamental to the QuickDraw GX object architecture. To draw or print in QuickDraw GX requires creating and manipulating QuickDraw GX shapes. A shape is a drawable graphic or typographic entity that you create with QuickDraw GX objects.Shapes come in two general categories: graphic and typographic. Graphic shapes are further subdivided into geometric shapes (points, lines, rectangles, polygons, and so on), bitmap shapes, and picture shapes. Typographic shapes are subdivided into text shapes, glyph shapes, and layout shapes. Table 2-1 on page 2-9 describes all the types of shapes recognized by QuickDraw GX.
This chapter discusses only shapes in general. The QuickDraw GX object architecture allows you to perform many operations on a shape without regard for what type of shape it is; those are the operations described here.
In the QuickDraw GX architecture, every shape includes four objects:
Figure 2-1 shows the four objects used to represent a QuickDraw GX shape.
- Shape object. A shape object describes the geometric structure or text content of a shape and contains references to the other objects that make up the shape.
- Style object. A style object defines much of the appearance of a shape, such as the size of the pen with which it is drawn or the size of its text. See the chapter "Style Objects" in this book for more information.
- Ink object. An ink object defines the color and transfer mode to use when drawing a shape. See the chapter "Ink Objects" in this book for more information.
- Transform object. A transform object defines how the appearance of a shape is altered (such as by clipping, scaling, or rotation) when it is drawn, and how the shape responds to mouse clicks. A transform object also contains references to the view port objects that describe where the shape is drawn. See the chapter "Transform Objects" in this book for more information.
Figure 2-1 Basic components of a QuickDraw GX shape
The interface to each of these object types is entirely procedural--you cannot in most cases access any information in the objects directly. You must manipulate the items of information in an object, called the properties of the object, using QuickDraw GX functions.
The rest of this chapter describes the data types and functions you can use to create and manipulate shape objects and their properties.
- Terminology Note
- A QuickDraw GX shape is considered to be the combination of four objects just described. A shape object is one of the objects that make up the shape; it defines, among other characteristics, the shape's geometry, which is the description of the specific dimensions and location of the kind of shape (line, curve, rectangle, and so on) that is to be drawn.
![]()